package com.dream.dao.order;

/**
 * 
 * @author Evan
 * @date 2013-8-25
 * 
 */
import org.springframework.stereotype.Repository;

import com.dream.model.order.OrderCustomer;
import com.dream.utils.hibernate.DetachedCriteriaBuilder;
import com.dream.utils.hibernate.DreamBaseDAO;

@Repository
public class OrderCustomerDAO extends DreamBaseDAO<OrderCustomer> {
	
	public OrderCustomer searchCustomer(String name,String mobile){
		
		DetachedCriteriaBuilder builder = DetachedCriteriaBuilder.instance(OrderCustomer.class);
		builder.addEq("deleted", false).addEq("name", name).addEq("mobile", mobile);
		return this.selectTopOne(builder);
		
	}
	
}
